/**
 * @file __BSP_USART_H
 * @author zipeng
 * @brief 
 * @version 0.1
 * @date 2021-11-20
 * 
 * @copyright Copyright JZI (c) 2021
 * 
 */
#ifndef __BSP_USART_H
#define __BSP_USART_H

#include "cmsis_os.h"
#include "queue.h"
#include <stdint.h>
#include <stdio.h>
#include <string.h>

//#define
#define USART_TX_LENGTH	256
#define USART_RX_LENGTH	256

typedef struct{
	uint8_t TXBUF[USART_TX_LENGTH];
	uint8_t RXBUF[USART_RX_LENGTH];
}T_USART_MESSAGE;
//extern
extern T_USART_MESSAGE  T_Usart1_Message;
extern T_USART_MESSAGE  T_Usart2_Message;
//function init
void USART1_IT_Init(void);
void u1_printf(char* fmt,...);
void send_data_dma_u1(uint8_t *buf,uint16_t len);

void USART2_IT_Init(void);
void u2_printf(char* fmt,...);
void send_data_dma_u2(uint8_t *buf,uint16_t len);

#endif /*__BSP_USART_H*/

